if (($(date "+%H") == 7));
then
    echo "Run update!"
    cd /root/YMD && git pull
    #bash /root/YMD/check.sh
fi

if (($(date "+%H") >= 8)) && (($(date "+%H") <= 22)) ;
then
    echo "Run!"
    bash /usr/YMD/env.sh YMD_ksjsb
else
    echo "Out of the time!"
fi

if (($(date "+%u") == 6)) && (($(date "+%H") == 23)) ;
then
    echo "Report!"
    rm /root/YMD/run.log
    bash /usr/YMD/env.sh YMD_ksjsb > /root/YMD/run.log
    bash /root/YMD/mail.sh
fi